package com.zcm.consumer.controller;

import com.zcm.consumer.dao.Goods;
import com.zcm.consumer.feign.RemoteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wxhntmy
 */
@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private RemoteService remoteService;

    @GetMapping("/goods/{id}")
    public Goods findGoodsById(@PathVariable("id") int id) {
        return remoteService.findGoodsById(id);
    }


}